package qc.module.iot.api.channel.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import qc.common.core.enums.CommunicationChannelTypeEnum;
import qc.common.core.enums.iot.IotPacketsDataProtocolEnum;
import qc.common.core.enums.iot.IotPacketsTransmitProtocolEnum;
import qc.module.iot.service.IotChannelService;
import qc.module.iot.service.IotFramePacketsService;

/**
 * 透明传输通道入站Handler
 *
 * @author QuCheng Tech
 * @since 2025/11/4
 */
public class TransparentTransmitChannelInboundHandler extends NettylInboundBaseHandler {
    private static final Logger logger = LoggerFactory.getLogger(TransparentTransmitChannelInboundHandler.class);

    /**
     * 构造函数
     *
     * @param framePacketsService 数据帧Service
     * @param channelService      通信信道Service
     * @param packetsSendToMQ     数据帧报文是否先发送至MQ
     * @param channelId           通道ID
     * @param channelName         通道名称
     * @param channelType         通道类型
     * @param isUdp               是否使用UDP协议
     * @param port                端口
     * @param dataProtocol        数据协议
     * @return
     * @author QuCheng Tech
     * @since 2025/11/5
     */
    public TransparentTransmitChannelInboundHandler(IotFramePacketsService framePacketsService, IotChannelService channelService, boolean packetsSendToMQ,
                                                    String channelId, String channelName, CommunicationChannelTypeEnum channelType,
                                                    boolean isUdp, int port, IotPacketsDataProtocolEnum dataProtocol) {
        super(framePacketsService, channelService, packetsSendToMQ, channelId, channelName, channelType,
                isUdp, port, IotPacketsTransmitProtocolEnum.TRANSPARENT, dataProtocol);
    }

    //如果不需要根据传输协议进行处理可以直接使用Base中的处理方法，不需要再重载任何方法；
    //如有传输协议需要进行特殊处理，根据需要重载对应方法
}
